﻿--职级异动申请
Create proc [dbo].[proc_CompanyMoveApply]
(
	@eid int,
	@ACompanyId int,
	@ADepartmentId int,
	@AZhiWu nvarchar(50),
	@reason text,
	@proposer nvarchar(50),
	@id int,
	@kbn int
)
as
	
	Declare @BCompanyId int, @BDepartmentId int,@BZhiWu nvarchar(50)
	Select @BCompanyId=CompanyId,@BDepartmentId=DepartmentId,@BZhiWu=ZhiWu From Employee Where id = @eid

			
	insert into employee_CompanyMove
	(
		eid,BCompanyId,ACompanyId,BDepartmentId,ADepartmentId,BZhiWu,AZhiWu,reason,proposer,appliontime
	) 
	values
	(
		@eid,@BCompanyId,@ACompanyId,@BDepartmentId,@ADepartmentId,@BZhiWu,@AZhiWu,@reason,@proposer,getdate()
	)




